﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Suggest.aspx.cs" Inherits="SY.WebSite.Web.View.Exception" %>
<%@ Register Src="UserControl/UserPanel.ascx" TagName="UserPanel"  TagPrefix="nc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>建议反馈 - <%=Settings.Title%></title>
    <link href="<%=Settings.StaticFileDomain%>/Themes/Foundation/stylesheets/foundation.min.css" rel="stylesheet" type="text/css" />
    <link href="<%=Settings.StaticFileDomain%>/Themes/Default/index.css" rel="stylesheet" type="text/css" />
    <link href="<%= Settings.StaticFileDomain %>/Scripts/util/JqModal/JqPopU.css" rel="stylesheet" type="text/css" />
    <link href="<%= Settings.StaticFileDomain %>/Scripts/util/ui.uapselector/skin/default/main.css" rel="stylesheet" type="text/css" />
    <link href="<%= Settings.StaticFileDomain %>/Scripts/util/jquery-pagination/lib/jquery_pagination/pagination.css" rel="stylesheet" type="text/css" />
    
    <script src="<%=Settings.StaticFileDomain%>/Scripts/jquery-1.6.1.min.js" type="text/javascript"></script>
    <script src="<%= Settings.StaticFileDomain %>/Scripts/util/utility.js" type="text/javascript"></script>
    <script src="<%= Settings.StaticFileDomain %>/Scripts/util/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="<%= Settings.StaticFileDomain %>/Scripts/util/template/trimpath-template.js" type="text/javascript"></script>
    <script src="<%= Settings.StaticFileDomain %>/Scripts/util/JqModal/JqPopU.js" type="text/javascript"></script>
    <script src="<%= Settings.StaticFileDomain %>/Scripts/util/jquery-pagination/lib/jquery_pagination/jquery.pagination.js" type="text/javascript"></script>
    <script src="<%= Settings.StaticFileDomain %>/Scripts/util/ui.uapselector/jquery.ui.uapselector.js" type="text/javascript"></script>
</head>
<body>
    <div class="container top-bar">    
        <div class="attached">
            <div class="name">
                <span><a href="javascript:void(0)">建议反馈</a></span>
            </div>
            <ul class="right">
                <li class="current"><a href="#">建议反馈</a></li>
                <li><a href="/Jifen/Index.aspx">素币系统</a></li>
                <li><a href="/Reward/Index.aspx">悬赏系统</a></li>
                <li class="choose">
  			      <a href="javascript:void(0)">帐号管理</a>
                  <div>
                    <% if (CurrentUser.UserType == 100) {%>
                    <a href="<%= Settings.DomainUrl %>/Admin/Manage.aspx">后台管理</a>
                    <% }%>
                    <a href="<%= Settings.DomainUrl %>/ResetPassword.aspx">修改密码</a>
                    <a id="logout" href="javascript:void(0)">退出登录</a>
                  </div>
  			    </li>
            </ul>
        </div>
    </div>

    <div class="row">
        <div class="nine columns">
            <h5>建议列表查询</h5>
    <p>
        时间：<input id="start" type="text" class="Wdate date" onClick="WdatePicker({maxDate:'#F{$dp.$D(\'end\')}'})"/>&nbsp; - &nbsp;<input id="end" type="text" class="Wdate date" onClick="WdatePicker({minDate:'#F{$dp.$D(\'start\')}'})"/>
        <br />
        员工：<label type="text" class="date" id="userId" style="position: relative; top:11px;"></label>
        部门：<input type="text" class="date" id="deptName" />
        <input type="button" class="small button" value="查询" id="btnQuery" />
    </p>

    <div id="result"></div>
    <div id="pagination"></div>

    <textarea name="transaction" id="transaction" style="display:none;">        
        <table class="niceTab" width="100%" cellspacing="0" cellpadding="0" border="0">
            <thead>
                <tr><th>内容</th><th class="two">奖赏情况</th><th>涉及部门</th><th>状态</th></tr>
            </thead>
            <tbody>
                {for l in list}
                    <tr>
                    <td>
                        <h5>@{l.Title}</h5>
                        <p>@{l.Description.replace(/\n/g,"<br />")} </p>
                        <span style="color:gray">@{l.UserName}(@{l.UserId})&nbsp;@{l.CreateTime.ToDate().Format("yyyy-MM-dd hh:mm")}</span>
                        {if l.ControlComment && l.ControlComment!=""}
                            <hr /><p><strong>管理员批示：</strong><br />@{l.ControlComment.replace(/\n/g,"<br />")} </p>
                        {/if}
                        {if l.ToUserId}
                            <hr /><p>
                            <strong>跟进人：</strong>@{l.ToUserName}(@{l.ToUserId})
                            {if l.Feedback}
                            <br />@{l.Feedback.replace(/\n/g,"<br />")}
                            {/if}
                            </p>
                        {/if}
                    </td>
                    <td class="center">{if l.Amount>0}@{l.Amount} {if l.Type==1}素币{else}元{/if}{/if}</td>
                    <td>@{l.RelateDeptName}</td>
                    <td class="center">{if l.Status == 0}待跟进{elseif l.Status == 1}处理中{elseif l.Status == 2}待审核{else}已完成{/if}</td>
                    </tr>
                {forelse}
                    <tr><td colspan="5" class="center">暂无相关数据</td></tr>
                {/for}
            </tbody>
        </table>
    </textarea>
    
    <textarea name="querymore" id="querymore" style="display:none;">        
        <div class="header">
            <h5>{if page.more =="top"}被采纳建议{/if}排行榜</h5>
        </div>
        <table class="niceTab" width="100%" cellspacing="0" cellpadding="0" border="0">
            <thead>
                <tr><th>排名</th><th>姓名</th><th>部门</th><th>被采纳建议数</th></tr>
            </thead>
            <tbody>
                {for l in list}
                    <tr><td class="center">@{l.Rank}</td><td class="center">@{l.UserName}(@{l.JobNumber})</td><td class="center">@{l.DeptName}</td></Td><td class="center">@{l.Count}</td></tr>
                {forelse}
                    <tr><td colspan="4" style="text-align:center;">暂无相关信息</td></tr>
                {/for}
            </tbody>
        </table>
    </textarea>

    <script src="<%= Settings.StaticFileDomain %>/Scripts/page/suggest.js" type="text/javascript"></script>
        </div>
        <div class="three columns right">
            <nc1:UserPanel ID="uc_panel" runat="server" />

            <div class="rank">
                <h5>&nbsp;&nbsp;建议排行榜</h5>
                <a href="Suggest.aspx?more=top" class="small round button secondary more">更多</a>
                <ul>
                    <% for (var i = 0; i < TopSuggest.Count; i++)
                       {%>
                        <li title="<%= TopSuggest[i]["UserName"]%> [<%= TopSuggest[i]["DeptName"]%>]">
                            <span><em><%= i+1 %></em><a href="Suggest.aspx?userId=<%= TopSuggest[i]["JobNumber"]%>"><%= TopSuggest[i]["UserName"]%> [<%= TopSuggest[i]["DeptName"]%>]</a></span>
                            <%= TopSuggest[i]["Count"]%>
                        </li>
                    <% }%>
                </ul>
            </div>
        </div>
    </div>

    <div id="scroll">
        <div id="toTop" class="scroll toTop"></div>
        <div id="toInterface" class="scroll toContent" title="建议反馈"></div>
        <div id="toBottom" class="scroll toBottom"></div>
    </div>
    
    <script src="<%= Settings.StaticFileDomain %>/Scripts/page/master.js" type="text/javascript"></script>
    <div class=" footer">CopyRight &copy; <%= DateTime.Now.Year %> 福州素天下食品有限公司</div>

    <script type="text/javascript">
        page.userList =<%= ToJson(UserList) %>;
        page.more = '<%= Request.QueryString["more"] %>';
        page.queryUserId = '<%= Request.QueryString["userId"] %>';
    </script>
</body>
</html>